package com.sunwhite.codeidea.timeutils;

import java.time.LocalDate;
import java.time.temporal.TemporalAdjusters;

public class Java8TimeUtil {

  public static void main(String[] args) {
    //
      LocalDate now = LocalDate.now();
      LocalDate date = LocalDate.of(now.getYear(), 1, 1);
    for (int i = 0; i < 12; i++) {
      //
        LocalDate localDate1 = date.plusMonths(i).with(TemporalAdjusters.lastDayOfMonth());
        System.out.println(localDate1.getYear()+"-"+localDate1.getMonth().getValue()+"-"+localDate1.getDayOfMonth());
    }
  }
}
